package com.luweijie.authentication.provider;


import com.luweijie.entity.vo.Result;
import com.luweijie.po.Resource;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Set;

@FeignClient(name = "shzw-authority", fallback = ResourceProviderFallback.class)
public interface ResourceProvider {

    @GetMapping(value = "/authority/resource/all")
    Result<Set<Resource>> resources();

    @GetMapping(value = "/authority/resource/user/{username}")
    String resources(@PathVariable("username") String username);
}
